.class public Lcom/waiqin365/lightapp/order/b/a/b;
.super Lcom/waiqin365/lightapp/order/b/c;


# direct methods
.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;)V
    .locals 8

    const/16 v0, 0x3f1

    invoke-direct {p0, v0}, Lcom/waiqin365/lightapp/order/b/c;-><init>(I)V

    const-string/jumbo v0, "/app/order/client/v2/confirmOrder.action"

    iput-object v0, p0, Lcom/waiqin365/lightapp/order/b/a/b;->c:Ljava/lang/String;

    iget-object v0, p0, Lcom/waiqin365/lightapp/order/b/a/b;->e:Ljava/util/HashMap;

    const-string/jumbo v1, "Content-Type"

    const-string/jumbo v2, "application/x-www-form-urlencoded"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    :try_start_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/order/b/a/b;->e:Ljava/util/HashMap;

    const-string/jumbo v1, "auth-code"

    invoke-virtual {v0, v1, p1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    :goto_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/order/b/a/b;->d:Ljava/util/HashMap;

    const-string/jumbo v1, "data.id"

    invoke-virtual {v0, v1, p2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    iget-object v0, p0, Lcom/waiqin365/lightapp/order/b/a/b;->d:Ljava/util/HashMap;

    const-string/jumbo v1, "data.token"

    invoke-virtual {v0, v1, p6}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    iget-object v0, p0, Lcom/waiqin365/lightapp/order/b/a/b;->d:Ljava/util/HashMap;

    const-string/jumbo v1, "data.actual_amount"

    invoke-virtual {v0, v1, p3}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    iget-object v0, p0, Lcom/waiqin365/lightapp/order/b/a/b;->d:Ljava/util/HashMap;

    const-string/jumbo v1, "data.order_amount"

    invoke-virtual {v0, v1, p4}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    new-instance v2, Lorg/json/JSONArray;

    invoke-direct {v2}, Lorg/json/JSONArray;-><init>()V

    const/4 v0, 0x0

    move v1, v0

    :goto_1
    invoke-interface {p5}, Ljava/util/List;->size()I

    move-result v0

    if-ge v1, v0, :cond_0

    new-instance v3, Lorg/json/JSONObject;

    invoke-direct {v3}, Lorg/json/JSONObject;-><init>()V

    invoke-interface {p5, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/product/d/d;

    :try_start_1
    const-string/jumbo v4, "id"

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/product/d/d;->b()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v3, v4, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v4, "confirm_count"

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/product/d/d;->g()Ljava/lang/Double;

    move-result-object v0

    const-wide/16 v6, 0x0

    invoke-static {v0, v6, v7}, Lcom/fiberhome/gaea/client/d/k;->a(Ljava/lang/Double;D)D

    move-result-wide v6

    invoke-virtual {v3, v4, v6, v7}, Lorg/json/JSONObject;->put(Ljava/lang/String;D)Lorg/json/JSONObject;
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0

    :goto_2
    invoke-virtual {v2, v3}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;

    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_1

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    goto :goto_2

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/order/b/a/b;->d:Ljava/util/HashMap;

    const-string/jumbo v1, "data.products"

    invoke-virtual {v2}, Lorg/json/JSONArray;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    return-void

    :catch_1
    move-exception v0

    goto :goto_0
.end method
